import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import dayjs from "dayjs";
import Moment from "moment";
/*配置element-ui组件*/
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";

// 图片放大
import VueDirectiveImagePreviewer from "vue-directive-image-previewer";
import "vue-directive-image-previewer/dist/assets/style.css";
Vue.use(VueDirectiveImagePreviewer);
//公共css
import "./utils/public.scss";
// 全局修改默认配置，按下ESC不能关闭弹窗
ElementUI.Dialog.props.closeOnPressEscape.default = false;
// 定义全局时间戳过滤器
Vue.filter("formatDate", function(value) {
  return value ? Moment(value).format("YYYY-MM-DD hh:mm:ss") : value;
});

Vue.use(ElementUI);
Vue.prototype.dayjs = dayjs;
import elCascaderMulti from "el-cascader-multi";
Vue.use(elCascaderMulti);

Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
